//
//  LHMessage.h
//  LazyHome
//
//  Created by yh on 2018/4/17.
//  Copyright © 2018年 yh. All rights reserved.
//

#import <Foundation/Foundation.h>
static u_char HEAR_DATA = 0xAA;
static u_char fn = 0b00000000;
@protocol LHMessageEncoder

@end

@protocol LHMessageDecoder

@end

@interface LHMessage : NSObject
@property (nonatomic, strong) NSData *headData;
@property (nonatomic, strong) NSData *fnData;
@property (nonatomic, strong) NSData *cmdData;
@property (nonatomic, strong) NSData *lengthData;
@property (nonatomic, strong) NSData *data;
+ (instancetype)messageWithData:(NSData *)data cmd:(ushort)cmd;

- (NSData *)messageData;

@end
